package com.caac.core.dm;

import com.caac.core.config.ActionConf;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright caac 2004</p>
 * <p>Company: caac</p>
 * @author <a href="mailto:project@caac.com.cn">Project Group</a>
 * @version 1.0
 */

public class Menu extends BaseDm {
	private static final long serialVersionUID = 1L;
	private String menuName;
    private Integer menuCode;
    private String menuAction;
    private String menuDesc;
    private Integer menuParent;
    private Integer grade;
    private String icon;
    private String openIcon;

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public Integer getMenuCode() {
        return menuCode;
    }

    public void setMenuCode(Integer menuCode) {
        this.menuCode = menuCode;
    }

    public String getMenuAction() {
        return menuAction;
    }

    public String getMenuDesc() {
        return menuDesc;
    }

    public Integer getMenuParent() {
        return menuParent;
    }

    public Integer getGrade() {
        return grade;
    }

    public String getOpenIcon() {
        return openIcon;
    }

    public String getIcon() {
        return icon;
    }

    public void setMenuAction(String menuAction) {
        this.menuAction = menuAction;
    }

    public void setMenuDesc(String menuDesc) {
        this.menuDesc = menuDesc;
    }

    public void setMenuParent(Integer menuParent) {
        this.menuParent = menuParent;
    }

    public void setGrade(Integer grade) {
        this.grade = grade;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public void setOpenIcon(String openIcon) {
        this.openIcon = openIcon;
    }

    protected int doHashCode() {
        return getHashCodeBuilder().append(menuCode).toHashCode();
    }

    protected boolean doEquals(Object object) {
        Menu other = (Menu) object;
        return getEqualsBuilder().append(menuCode, other.menuCode).isEquals();
    }

    public boolean isAccessible(ActionConf actionConf) {
        return true;
    }
}
